home *** CD-ROM | disk | FTP | other *** search
- Subject: Re: Externalize/Internalize Problem
- Sent: 7/29/96 8:30 PM
- Received: 7/30/96 9:18 AM
- From: john paulson, paulson3@apple.com
- Reply-To: ODF Interest, ODF-Interest@CILabs.ORG
- To: OpenDoc Development Framework Discussion List, ODF-Interest@CILabs.
-
- When an ODStorageUnitSink is created, su->Focus() is called. The
- second su->Focus() will
- cause the previously written data to be overwritten. To solve the
- problem, create a single
- FW_PStorageUnitSink in Externalize/Internalize. Declare
- ExternalizeProxyList() and
- ExternalizeMyData() to take an FW_OStorageUnitSink * (instead of an
- ODStorageUnit *). Call
- the routines with the FW_PStorageUnitSink. No double Focus() occurs.
-
-
- >My Externalize/Internalize is in two steps.
- >
- >void CMyContent::Externalize(...)
- >{
- > ExternalizeProxyList(ev, storageUnit, cloneInfo);
- > ExternalizeMyData(ev, storageUnit, cloneInfo);
- >}
- >
- >FW_Boolean CMyContent::Internalize(...)
- >{
- > FW_Boolean bResult = false;
- >
- > if (storageUnit->Exists(ev, kODPropContents, fMyPart->GetPartKind(ev), 0))
- > {
- > InternalizeProxyList(ev, storageUnit, cloneInfo);
- > InternalizeMyData(ev, storageUnit, cloneInfo);
- > //....
- > bResult = true;
- > }
- > return bResult;
- >}
-